package com.origin.common.result;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author yezh
 * @date 2024/2/4 10:12
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class RestPageResult<T> extends RestResult<T> {

    private long size;

    private long current;

    public static <T> RestPageResult<T> success(T data, long total, long size, long current) {
        RestPageResult<T> restPageResult = new RestPageResult<>();
        restPageResult.data(data);
        restPageResult.total = total;
        restPageResult.size = size;
        restPageResult.current = current;
        return restPageResult;
    }

}
